<template>
	<div>
		<van-tabbar v-model="active" @change="onChange" active-color="#ee0a24" inactive-color="#000">
		  <van-tabbar-item icon="wap-home-o">首页</van-tabbar-item>
		  <van-tabbar-item icon="description">订单</van-tabbar-item>
		</van-tabbar>
	</div>
</template>

<script>
	
	import Vue from 'vue';
	import { Tabbar, TabbarItem,Icon,Notify } from 'vant';
	
	Vue.use(Tabbar);
	Vue.use(TabbarItem);
	Vue.use(Icon);
	Vue.use(Notify);
	
	export default{
		data(){
			return{
				active:0,
				url:['/vocal/main','/vocal/indent']
			}
		},
		methods:{
			onChange(name,title){
				this.$router.push(this.url[name])
			}
		},
		created() {
			this.active = this.url.indexOf(this.$route.path)
		}
		
	}
	
</script>

<style scoped>
</style>
